package com.alex.boot.service;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

/**
 * redis 服务类
 */
@Service
public class RedisService {

    @Cacheable(value= "orderDetailCache", keyGenerator = "myKeyGenerator", unless = "#result eq null")
    public String findOrderDetail(String id) {
        return "Redis service id: " + id;
    }

}
